<template>
	<view>
		<view class="culture-box mg-lr-25">
			<view class="culture-item-box" v-for="(cultureItem,index) in newsList" :key="index"
				@click="newsDetail(cultureItem)">
				<!-- <image :src="cultureItem.picture" mode=""></image> -->
				<u-lazy-load :image="cultureItem.picture" :loading-img="loadingImg" :error-img="errorImg"></u-lazy-load>
				<view class="">
					<text class="line-2">{{cultureItem.title}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "xh-culture",
		props: {
			newsList: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				loadingImg: '/static/uView/loading.png',
				errorImg: '/static/uView/load_error.png'
			};
		},
		methods: {
			newsDetail(e) {
				this.$emit("toDetail", e)
			}
		}
	}
</script>

<style>
	.culture-box {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		column-gap: 25rpx;
		row-gap: 30rpx;

	}

	.culture-item-box>image {
		height: 344rpx;
		width: 100%;
	}
</style>
